package pers.twf.twfRpc.fault.tolerant;

import pers.twf.twfRpc.spi.SpiLoader;

/**
 * 容错策略工厂
 */
public class TolerantStrategyFactory {

    static {
        SpiLoader.load(TolerantStrategy.class);
    }


    /**
     * 默认容错策略
     */
    public static final TolerantStrategy DEFAULT_STRATEGY = new FailFastTolerantStrategy();


    public static TolerantStrategy getInstance(String key){
        return SpiLoader.getInstance(TolerantStrategy.class, key);
    }




}
